<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:38:"./views/home/mobile/mytask/index.phtml";i:1625664544;s:70:"/www/wwwroot/10.168.1.202/public/views/home/mobile/common/header.phtml";i:1541935408;s:69:"/www/wwwroot/10.168.1.202/public/views/home/mobile/mytask/_list.phtml";i:1609669538;s:71:"/www/wwwroot/10.168.1.202/public/views/home/mobile/common/ufooter.phtml";i:1625675066;}*/ ?>
﻿<!DOCTYPE HTML>
<html>

<head>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>我发布的</title>
    <link rel="stylesheet" href="/static/home/mobile/css/bootstrap.css">
  
    <link rel="shortcut icon" href="clientapp/images/new_images/favicon.ico" />
<link href="/static/home/mobile/css/reset_5.css" rel="stylesheet" type="text/css" />
<link href="/static/home/mobile/css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/static/home/mobile/css/font-awesome.min.css">
<link href="/static/home/mobile/css/new_style.css" rel="stylesheet" type="text/css" />
<!-- 弹出层 -->
<link rel="stylesheet" href="/static/plugins/dialog/css/dialog.css" />
<script src="/static/home/mobile/js/jquery-2.0.3.min.js"></script>
<script src="/static/plugins/dialog/js/dialog.js"></script>
<!-- 弹出层 -->
<script type="text/javascript" src="/static/plugins/clipboard.min.js"></script>
<script type="text/javascript" src="/static/home/mobile/js/global.js?v=2"></script>
    <style type="text/css">

    
        .zhuanghu-tab li {
            width: 20%;
        }
        .task-list-remain-num span {
            width: 33.33%;
            float: left;
            text-align: center;
        }
        .paging {
            margin: 30px 0;
        }
        .dialog {
          position: fixed;
          left: 0;
          top: 0;
          z-index: 100001;
          width: 100%;
          height: 100%;
        }
        .dialog-content {
            width: 70%;
        }
        .dialog-overlay {
          position: absolute;
          top: 0;
          left: 0;
          z-index: 10002;
          width: 100%;
          height: 100%;
          background-color: rgba(0, 0, 0, 0.5);
        }
      .zhuanghu-tab li {
   			 width: 16.6%;
}

.modal.modal-in {
    opacity: 1;
    transition-duration: .4s;
    transform: translate3d(0,0,0) scale(1);
}


.modal {
    width: 340px;
    position: fixed;
    z-index: 1100;
    left: 50%;
    margin-left: -170px;
    margin-top: -170px;
    top: 50%;
    text-align: center;
    border-radius: 10px;
    opacity: 0;
    transform: translate3d(0,0,0) scale(1.185);
    transition-property: transform,opacity;
    color: #3d4145;
    display: block;
}

.modal-inner {
    padding: 20px;
    border-radius: 10px 10px 0 0;
    position: relative;
    background: #e8e8e8;
}
.modal-title {
    font-weight: 500;
    font-size: 16px;
    text-align: center;
}
.modal-title+.modal-text {
    margin-top: 5px;
}
.add_redpackets_modal>div {
    margin-top: 10px;
    font-size: 14px;
    line-height: 30px;
}

.row {
    overflow: hidden;
    margin-left: -4%;
}
.row .col-40 {
    width: 36%;
    margin-left: 4%;
}
.row .col-33 {
    width: 29.333333333333332%;
    margin-left: 4%;
}
input.modal-text-input {
    box-sizing: border-box;
    height: 30px;
    background: #fff;
    margin: 0;
    margin-top: 0px;
    padding: 0 10px;
    border: 1px solid #a0a0a0;
    border-radius: .25rem;
    width: 100%;
    font-size: 14px;
    font-family: inherit;
    display: block;
    box-shadow: 0 0 0 transparent;

}

.row .col-10 {
    width: 6%;
    margin-left: 4%;
}

.row>[class*=col-], .row>[class*=tablet-] {
    box-sizing: border-box;
    float: left;
}

.add_redpackets_modal .price_a, .add_redpackets_modal .price_b, .add_redpackets_modal .price_c {
    color: #ff6700;
    font-weight: bold;
}
.row .col-50 {
    width: 46%;
    margin-left: 4%;
}

.modal-buttons {
    height: 50px;
    overflow: hidden;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.modal-button {
    width: 100%;
    padding: 0 10px;
    height: 50px;
    font-size: 18px;
    line-height: 50px;
    text-align: center;
    color: #0894ec;
    background: #e8e8e8;
    display: block;
    position: relative;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-box-flex: 1;
    -ms-flex: 1;
}

.modal-button:first-child {
    border-radius: 0 0 0 10px;
}
.modal-button.modal-button-bold {
    font-weight: 500;
}

.modal-button:last-child {
    border-radius: 0 0 10px 0;
}

.modal-overlay.modal-overlay-visible, .popup-overlay.modal-overlay-visible, .preloader-indicator-overlay.modal-overlay-visible {
    visibility: visible;
    opacity: 1;
}
.modal-overlay, .popup-overlay, .preloader-indicator-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.4);
    z-index: 10;
    visibility: hidden;
    opacity: 0;
    -webkit-transition-duration: .4s;
    transition-duration: .4s;
}

.view {
    display: inline-block;
    width: 20px;
    height: 16px;
    vertical-align: text-top;
    background: url(/static/home/mobile/images/reward_view.png?v=3);
    margin-right:10px;
    background-size: 100% 100%;
}

body{background:#111;}
.zhuanghu-tab li{background:#111;color:#fff;}
.zhuanghu-tab li.active{background:#111;color: #2F62FF;}
.zhuanghu-tab li:after, .zhuanghu-tab2 li:after{background:#666;}
.new-task-list ul li{background:#000;}
.new-task-list,.task-list,.paging{background:#111;}
span.task-title{color:#2F62FF !important}
.paging-selct{background:#2F62FF;color:#fff;}
    </style>
</head>

<body>
<div class="site-header header-fixed">
    <a onclick="history.back()" class="back"></a>
    <div class="tit-name">我发布的</div>
</div>
<div class="main Myrelease">
    <div class="zhuanghu-tab">
        <ul class="zh-tab-tit">
            <li id="all" class="<?php echo $category_type=='all'?'active':''; ?>" onclick="location.href='/home/mytask.html'">全部</li>
            <li id="wait" class="<?php echo $category_type=='wait'?'active':''; ?>" onclick="location.href='/home/mytask/category/t/wait.html'">待审核</li>
            <li id="ing" class="<?php echo $category_type=='ing'?'active':''; ?>" onclick="location.href='/home/mytask/category/t/ing.html'">进行中</li>
            <li id="pass" class="<?php echo $category_type=='pass'?'active':''; ?>" onclick="location.href='/home/mytask/category/t/pass.html'">已下架</li>
            <li id="past" class="<?php echo $category_type=='past'?'active':''; ?>" onclick="location.href='/home/mytask/category/t/past.html'">暂停中</li>
          <li id="past" class="<?php echo $category_type=='refuse'?'active':''; ?>" onclick="location.href='/home/mytask/category/t/refuse.html'">已拒绝</li>
        </ul>
    </div>
    <div class="task-list">
        <?php if(!empty($tasks)): ?>
        <div class="new-task-list">
            <ul>
                <?php if(is_array($tasks) || $tasks instanceof \think\Collection || $tasks instanceof \think\Paginator): $task_index = 0; $__LIST__ = $tasks;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$task): $mod = ($task_index % 2 );++$task_index;?>
<li>
    <div class="task-list-wrap" style="width:100%;padding:0px;margin-top:10px;">
        <div class="lines-top"  <?php if($task['category_type'] == "nopass"): ?> style="height:85px"<?php endif; ?>>
        	<div style="float:left;width:80px;">
        		<div style="margin:10px;margin-top:5px;">
               		<img style="width:60px;height:60px;border-radius:4px;" src="<?php echo $task['avatar']; ?>">
        		</div>
        		<div style="text-align:center;height:30px;line-height:30px;">
        			<span class="view"></span>
        			<?php echo $task['click']; ?>
        		</div>
        	</div>
        	
        	<div style="float:left;width:calc(100% - 80px);">
	            <div class="task-line-top" >
	            	<div style="float:left;">
	            		
	            		<b><a href="/home/task/detail/id/<?php echo $task['id']; ?>.html" style="padding: 0;border: 0;margin: 0;width: auto; float: left"><span class="task-title">[<?php echo $task['id']; ?>]  <?php echo $task['title']; ?> </span></a></b>
	            	</div>
	              
	               <div class="task-status" style="float:right;margin-right:20px;">
	                   <?php if($task['category_type'] == "past"): ?>
	                                暂停中
	                                <?php endif; if($task['category_type'] == "complete"): ?>
	                                已下架
	                                <?php endif; if($task['category_type'] == "wait"): ?>
	                                待审核
	                                <?php endif; if($task['category_type'] == "nopass"): ?>
	                                未通过审核
	                                <?php endif; if($task['category_type'] == "ing"): ?>
	                                进行中
	                                <?php endif; ?>
	               </div>
	            </div>
	            <div class="line-task-down"style="line-height:20px;margin-top:5px;">
	            	<div>
		                单价： <?php echo $task['unit_price']; ?>元
	            	</div>

		          <div>
	            	
	                <div style="float:left;">
	                	预订：<?php echo $task['join_num']; ?> ，  剩余：<?php echo abs($task['ticket_num']-$task['join_num']); ?>份
	                </div>
	                
	                	<!--<div style="float:right;">-->
		                	
		                <!--	             <?php if($task['category_type'] == "ing"): ?>-->
						            <!--  <a href="javascript:"  onclick="preShare(<?php echo $task['id']; ?>,<?php echo $task['unit_price']; ?>)" class="task-list-manage-button" style="padding:0;margin-right:10px;">分享</a>-->
						            <!-- <?php endif; ?>-->
		                <!--</div>-->
		                
		                	
		                </div>
	            </div>
	     
	            <div class="line-task-down" style="line-height:20px;">
	            	<div style="width:100%;height:20px;">
		                <div style="float:left;">
		                	
		                开始时间：<?php echo date('Y-m-d H:i',$task['start_time']); ?>
		                </div>
		                
	            		
	            	</div>
	            	
	            	<div  style="width:100%;height:20px;">
	            		<div style="float:left;">
		                	结束时间：<?php echo $task['end_time']; ?>
		               </div>
		               
		                <div style="float:right;">
		     <?php if($task['category_type'] == "ing" && $task['join_num'] != 0): ?>
        			 <a href="/home/mytaskaudit/index/id/<?php echo $task['id']; ?>.html" onclick="check(<?php echo $task['id']; ?>)" class="task-list-manage-button" style="padding:0;margin-right:10px;">已完成列表</a>
            <?php endif; ?>
            
            </div>
            
		                
		                
	            	</div>
	            </div>
	<!--            <i class="icon"></i>-->
	            <?php if($task['category_type'] == "nopass"): ?>
	                <div class="line-task-down">
	                    未通过审核,原因：<?php echo $task['audit_remarks']; ?>
	                </div>
	            <?php endif; ?>
            
            </div>
            <div style="clear:both;"></div>
        </div>
        <div class="task-list-manage" style="margin:10px;width:100%;">
        	<?php if($task['out_stock_flag']!=1): if($task['is_send_redpackage']): ?>
        		 <a href="/home/task/redpackage/task_id/<?php echo $task['id']; ?>"  class="task-list-manage-button add_redpackets" >红包</a>
        		 
        		 
        		<?php else: ?>
            <a href="javascript:;"  class="task-list-manage-button add_redpackets" onclick="toggle_popup(<?php echo $task['id']; ?>)">红包</a>
            <?php endif; if($task['category_type'] == 'ing' || $task['category_type'] == 'past'): if($task['is_send_seepackage']): ?>
<a href="javascript:;"  class="task-list-manage-button add_redpackets" onclick="toggle_add_see(<?php echo $task['id']; ?>,<?php echo $task['seepackage_price']; ?>)">浏览</a>        		 	

<?php else: ?>
<a href="javascript:;"  class="task-list-manage-button add_redpackets" onclick="toggle_see(<?php echo $task['id']; ?>)">浏览</a>

<?php endif; endif; endif; if($task['category_type'] == "ing"): ?>
            <a href="javascript:" id="setTop<?php echo $task['id']; ?>" onclick="setTop(<?php echo $task['id']; ?>,'setTop')" class="task-list-manage-button"><?php echo $task['top_end_time']>0?'置顶':'置顶'; ?></a>
            <a href="javascript:" id="isStop<?php echo $task['id']; ?>" onclick="isStop(<?php echo $task['id']; ?>)" class="task-list-manage-button<?php echo $task['is_stop']>0?' ajax-ok':''; ?>"><?php echo $task['is_stop']==1?'开启':'暂停'; ?></a>
            <a href="javascript:" id="isZhuijia<?php echo $task['id']; ?>" onclick="setTop(<?php echo $task['id']; ?>,'piaoshu')" class="task-list-manage-button">加票</a>
            <a href="javascript:" id="isJiashi<?php echo $task['id']; ?>" onclick="setTop(<?php echo $task['id']; ?>,'tianshu')" class="task-list-manage-button">加时</a>
             <a href="javascript:" id="outStockTask<?php echo $task['id']; ?>" onclick="outStockTask(<?php echo $task['id']; ?>)" class="task-list-manage-button<?php echo $task['out_stock_flag']==1?' ajax-ok':''; ?>"><?php echo $task['out_stock_flag']==1?'已结束':'结束任务'; ?></a>
            
            
            <?php endif; if($task['category_type'] == "wait" || $task['category_type'] == "nopass"): ?>
            <!-- <a href="/home/task/edit/id/<?php echo $task['id']; ?>.html" class="task-list-manage-button">编辑</a>-->
            <a href="javascript:" class="task-list-manage-button task-list-manage-del" id="delMyTask<?php echo $task['id']; ?>" onclick="delMyTask(<?php echo $task['id']; ?>)">退还</a>
            <?php endif; if($task['category_type'] == "past"): ?>
            <a href="/home/mytaskaudit/index/id/<?php echo $task['id']; ?>.html" onclick="check(<?php echo $task['id']; ?>)" class="task-list-manage-button">审核</a>
            <a href="javascript:" id="outStockTask<?php echo $task['id']; ?>" onclick="outStockTask(<?php echo $task['id']; ?>)" class="task-list-manage-button<?php echo $task['out_stock_flag']==1?' ajax-ok':''; ?>"><?php echo $task['out_stock_flag']==1?'已下架':'下架'; ?></a>
            <a href="javascript:" id="isStop<?php echo $task['id']; ?>" onclick="isStop(<?php echo $task['id']; ?>)" class="task-list-manage-button<?php echo $task['is_stop']>0?' ajax-ok':''; ?>"><?php echo $task['is_stop']==1?'开启':'暂停'; ?></a>
            <a href="javascript:" id="isZhuijia<?php echo $task['id']; ?>" onclick="setTop(<?php echo $task['id']; ?>,'piaoshu')" class="task-list-manage-button">加票</a>
            <a href="javascript:" id="isJiashi<?php echo $task['id']; ?>" onclick="setTop(<?php echo $task['id']; ?>,'tianshu')" class="task-list-manage-button">加时</a>
            <a href="javascript:" id="isJiajia<?php echo $task['id']; ?>" onclick="setTop(<?php echo $task['id']; ?>,'jiajia')" class="task-list-manage-button" >加价</a>
            <?php if($task['is_dj'] ==0): ?>
            <a href="javascript:" style="background:#EC4F4F;" class="task-list-manage-button"  >已冻结</a><br/><br/>
            <p>冻结原因：<?php echo $task['dj_reason']; ?></p>
            <?php endif; endif; if($task['category_type'] == "complete"): ?>
            <a href="/home/mytaskaudit/index/id/<?php echo $task['id']; ?>.html" onclick="check(<?php echo $task['id']; ?>)" class="task-list-manage-button">审核</a>
            <?php endif; ?>

        </div>
    </div>
</li>
<?php endforeach; endif; else: echo "" ;endif; ?>

<style>
    .formdisplay{
        position: absolute;
        background-color: red;
        top:100px;
        left: 0;
        width:100%;
        height: 100px;
        display: none;
    }
    .formdisplayjiashi{
        position: absolute;
        background-color: red;
        top:100px;
        left: 0;
        width:100%;
        height: 100px;
        display: none;
    }
    .lines-top{
        width: 100%;
   
    }
    .task-line-top{
        width: 100%;
        height: auto;
        margin-top: 5px;
    }
    span.task-status{
        float: left;
        color: #f96a22;
        font-size: 18px;
    }
    span.task-title{
        float: left;
        color: #294455;
        font-size: 15px;
    }
  span.task-title i{
  	font-size:14px;
  }
    i.icon{
        margin-left: 5px;
        right: 15px;
        content: '';
        background-image: url("/static/home/mobile/picture/ard.png");
        height: 25px;
        width: 14px;
        display: inline-block;
        position: absolute;
    }
    .line-task-down{
        width: 100%;
        height: auto;
        font-size: 1.2rem;
        color: #78797d;
        display: inline-block;
        clear: both;
    }
  .task-list-manage .task-list-manage-button{
  	
    
  }
</style>
<div class="formdisplay">
    <form method="post">
        <div><span>追加票数为:</span><input type="text" name="piaoshu" /></div>
        <input type="hidden" name="taskid">
        <div><input type="submit" onclick="zhuijia()"></div>
    </form>
</div>
<div class="formdisplayjiashi">
    <form method="post">
        <div><span>追加天数为:</span><input type="text" name="tianshu" /></div>
        <input type="hidden" name="taskidts">
        <div><input type="submit" onclick="jiashi()"></div>
    </form>
</div>



<div id="menu" style="position:fixed;top:0;bottom:0;height:100%;width:100%;background:rgba(0,0,0,0.5);z-index:9999;display:none;" onclick="$('#menu').hide()">

<div style="width:96%;margin-left:2%;background:#fff;border-radius:6px;position:fixed;bottom:10px;">
	<div style="width:100%;text-align:center;color:#5757ab;font-size: 16px;height:50px;line-height:50px;border-bottom:1px solid #eee;color:#FCC827;" >
	分享任务，提升排名
  </div>
  
  <div style="width:100%;text-align:center;color:#5757ab;font-size: 18px;height:50px;line-height:50px;border-bottom:1px solid #eee;" onclick="share(0)">
  微信朋友圈
  </div>
  <div style="width:100%;text-align:center;color:#5757ab;font-size: 18px;height:50px;line-height:50px;border-bottom:1px solid #eee;" onclick="share(1)">
  微信好友
  </div>
  <!--<div style="width:100%;text-align:center;color:#5757ab;font-size: 18px;height:50px;line-height:50px;border-bottom:1px solid #eee;" onclick="share(2)">-->
  <!--QQ好友-->
  <!--</div>-->
  <!--<div style="width:100%;text-align:center;color:#5757ab;font-size: 18px;height:50px;line-height:50px;border-bottom:1px solid #eee;" onclick="share(3)">-->
  <!--QQ空间-->
  <!--</div>-->
    <div style="width:100%;text-align:center;color:#5757ab;font-size: 18px;height:50px;line-height:50px;border-bottom:1px solid #eee;" onclick="share(4)">
  复制链接
  </div>
  <div style="width:100%;text-align:center;color:#5757ab;font-size: 18px;height:50px;line-height:50px;border-bottom:1px solid #eee;" onclick="$('#menu').hide()">
  取消
  </div>

</div>


</div>



 <script src="/static/home/mobile/js/jsbridge-mini.js"></script>


<script>
	var task_id='';
	var unit_price=''
	function preShare(id,price){
		task_id=id
		unit_price=price
		$('#menu').show();
	}
	
	function share(val){
    	if(val == 4){
    		jsBridge.setClipboardText("http://fx.99dybk.com/?task_id="+task_id);
    		alert('复制推广链接成功');
    		return;
    	}


   		jsBridge.share({
		    //分享到，0 微信朋友圈，1 微信好友，2 QQ好友，3 QQ空间；未指定则弹出分享菜单
		    to    : val,
		    //标题，未指定则为当前页面 title 标题
		    title : unit_price+"元悬赏任务，赏金立即可提现！-寻小葱",
		    //链接，未指定则为当前页面链接
		    link  : "http://zz.99dybk.com/?task_id="+task_id,
		    //图标，未指定则为 App 图标
		    imgUrl: "https://wap.99dybk.com/static/home/mobile/login/img3.jpg",
		    //描述，如未指定，App 会尝试抓取页面 meta description content，<meta name="description" content="页面描述..." />
		    //均无描述内容则显示链接
		    desc: "下载蚂蚁推客APP,搜索任务ID："+task_id+",完成任务即可提现！" 
		}, function(succ) {
			                $.post(
                            '/home/mytask/share',
                            {
                              task_id: task_id,
                            },
                            function (ret) {
                            	
                              alert(succ ? "分享成功" : "分享失败或取消了分享");
                            },'json'
                        );
                        
                        
		   
		});
    }
	
	
    function isZhuijia(id) {
        $("input[name=taskid]").val(id);
        $(".formdisplay").css('display','block');
    }
    function isJiashi(id) {
        $("input[name=taskidts]").val(id);
        $(".formdisplayjiashi").css('display','block');
    }
    function isJiajia(id) {
        $("input[name=taskidjiajia]").val(id);
        $(".formdisplayjiajia").css('display','block');
    }
</script>
<script>
    function zhuijia() {
        var piaoshu = $("input[name=piaoshu]").val();
        var id = $("input[name=taskid]").val();
        if(isNaN(piaoshu) && piaoshu==0){
            alert('请输入正确票数');
            return false;
        }
        $.post('/home/mytask/iszhuijia.html', { piaoshu:piaoshu ,taskid:id}, function(res) {
            if (res.type == "success") {
                alert(res.message)
                window.location.href = location .href;
            }
        });
    }
    function jiashi() {
        var piaoshu = $("input[name=tianshu]").val();
        var id = $("input[name=taskidts]").val();
        if(isNaN(piaoshu) && piaoshu==0){
            alert('请输入正确天数');
            return false;
        }
        $.post('/home/mytask/jiashi.html', { tianshu:piaoshu ,taskid:id}, function(res) {
            console.log(res);
            if (res.type == "success") {
                alert(res.message)
                //window.location.href = location .href;
            }
        });
    }
 
</script>

<style>
    .piaoshu{
        width: 200px;
        border: 1px solid lightgrey;
    }
</style>
<!--<script>
    function isZhuijia(id) {
        $(document).dialog({
            titleText: '追加任务ID为'+id+'的票数',
            content: "票数:<input type='text' name='piaoshu' class='piaoshu'/>",
        });
    }
</script>-->

<script>
    function isStop(id) {
        if ($("#isStop" + id).hasClass("ajax-ok")) {
            $(document).dialog({
                type : 'confirm',
                titleText: '开启任务',
                content: '确定要开启任务ID为：' + id + '任务吗？',
                onClickConfirmBtn: function(){
                    Common.loading.show();
                    $.post('/home/mytask/stopstock.html', { id: id ,status: 1}, function(res) {
                        Common.loading.hide();
                        if (res.type == "success") {
                            window.location.href = location.href;
                        }
                        message(res.message,res.redirect,res.type);
                    });
                }
            });
        }else{
            $(document).dialog({
                type : 'confirm',
                titleText: '暂停任务',
                content: '确定要暂停任务ID为：' + id + '任务吗？',
                onClickConfirmBtn: function(){
                    Common.loading.show();
                    $.post('/home/mytask/stopstock.html', { id: id }, function(res) {
                        Common.loading.hide();
                        if (res.type == "success") {
                            window.location.href = location.href;
                        }
                        message(res.message,res.redirect,res.type);
                    });
                }
            });
        }
    }
</script>
            </ul>
        </div>
        <div class="task-del" style="display:none;">
            <a href="#" class="button4" onclick="MySaveTask.delSave()">删除(0)</a>
        </div>
        <div class="paging clearfix" style="display: block;">
            <span class="paging-prev">上一页</span>
            <span class="paging-num-total">
                    <select name="page" class="paging-selct" style="width:auto;padding:0px 10%;border-radius:10px;text-indent:0;">
                        <?php $__FOR_START_1677210169__=1;$__FOR_END_1677210169__=$pageCount+1;for($i=$__FOR_START_1677210169__;$i < $__FOR_END_1677210169__;$i+=1){ ?>
                        <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
                        <?php } ?>
                    </select>
                </span>
            <span class="paging-next" data-page="<?php echo $pageCount; ?>">下一页</span>
            <form id="page_form">
                <input type="hidden" name="page" value="1">
            </form>
        </div>
        <?php endif; ?>
    </div>
</div>



<div class="modal modal-in popup" style="display:none;">
	<div class="modal-inner">
		<div class="modal-title">发布悬赏红包</div>
			<div class="modal-text">
				    <div class="add_redpackets_modal">
				        <div class="row">
				          <div class="col-40 text-right">红包总额</div>
				          <div class="col-33"><input type="number" onchange="calc()" class="modal-text-input input unit_price" id="money" placeholder="最少1元"></div>
				          <div class="col-10">元</div>
				        </div>
				        <div class="row">
				          <div class="col-40 text-right">红包数量</div>
				          <div class="col-33"><input type="number" onchange="calc()" class="modal-text-input input number" id="number" placeholder="最少10"></div>
				          <div class="col-10">个</div>
				        </div>
				        <div>
				            扣除余额：<span class="price_a">0</span>
				            <div class="row">
					            <span class="tishi">任务结束后 剩余红包金额返回账户</span>
				            </div>
				        </div>
				    </div>
			</div>
		</div>

	<div class="modal-buttons ">
		<span class="modal-button" onclick="$('.popup').hide()">取消</span>
		<span class="modal-button modal-button-bold" onclick='send_redpackage()'>确定</span>
	</div>
</div>





<div class="modal modal-in see" style="display:none;">
	<div class="modal-inner">
		<div class="modal-title">发布浏览红包</div>
			<div class="modal-text">
				    <div class="add_redpackets_modal">
				        <div class="row">
				          <div class="col-40 text-right">红包单价</div>
				          <div class="col-33"><input type="number" onchange="calc_see()" class="modal-text-input input unit_price" id="see_money" placeholder="最少0.02元"></div>
				          <div class="col-10">元</div>
				        </div>
				        <div class="row">
				          <div class="col-40 text-right">红包数量</div>
				          <div class="col-33"><input type="number" onchange="calc_see()" class="modal-text-input input number" id="see_number" placeholder="最少500"></div>
				          <div class="col-10">个</div>
				        </div>
				        <div>
				            扣除余额：<span class="price_a">0</span>
				            <div class="row">
					            <span class="tishi">任务结束后 剩余红包金额返回账户</span>
				            </div>
				        </div>
				    </div>
			</div>
		</div>

	<div class="modal-buttons ">
		<span class="modal-button" onclick="$('.see').hide()">取消</span>
		<span class="modal-button modal-button-bold" onclick='send_see()'>确定</span>
	</div>
</div>




<div class="modal modal-in add_see" style="display:none;">
	<div class="modal-inner">
		<div class="modal-title">发布浏览红包</div>
			<div class="modal-text">
				    <div class="add_redpackets_modal">
				        <div class="row">
				          <div class="col-40 text-right">红包单价</div>
				          <div class="col-33"><input type="number" disabled  class="modal-text-input input unit_price" id="add_see_money"></div>
				          <div class="col-10">元</div>
				        </div>
				        <div class="row">
				          <div class="col-40 text-right">红包数量</div>
				          <div class="col-33"><input type="number" onchange="calc_add_see()" class="modal-text-input input number" id="add_see_number" placeholder="最少500"></div>
				          <div class="col-10">个</div>
				        </div>
				        <div>
				            扣除余额：<span class="add_price_a">0</span>
				            <div class="row">
					            <span class="tishi">任务结束后 剩余红包金额返回账户</span>
				            </div>
				        </div>
				    </div>
			</div>
		</div>

	<div class="modal-buttons ">
		<span class="modal-button" onclick="$('.add_see').hide()">取消</span>
		<span class="modal-button modal-button-bold" onclick='send_add_see()'>确定</span>
	</div>
</div>






<div class="modal-overlay modal-overlay-visible popup add_see" style="display:none;"></div>



<div class="modal-overlay modal-overlay-visible popup see" style="display:none;"></div>



<script type="text/javascript" src="/static/plugins/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="/static/home/mobile/js/bootbox.min.js"></script>
<script type="text/javascript">
var $setting_top_fee = '<?php echo $setting['top_fee']; ?>';
var $setting_top_max_hour = '<?php echo $setting['top_max_hour']; ?>';
</script>
<script type="text/javascript" src="/static/home/mobile/js/mytask.js?v=9"></script>

<style>
    #footer-bar li {
    width: 25%;
    float: left;
    
}
#footer-bar{background:#0d0d0d}
</style>

<footer id="footer-bar" lang="<?php echo $controller; ?>">
      <ul id="tabbar">
      <li><a href="/">
      <img src="/static/home/mobile/images/0011<?php if(in_array($controller,array('index'))): ?>_on<?php endif; ?>.png">
      <b>首页</b></a></li>
      <li><a href="/home/task/category.html"><img src="/static/home/mobile/images/0022<?php if(in_array($controller,array('task'))): ?>_on<?php endif; ?>.png"><b>大厅</b></a></li>

      <li><a href="/home/invite.html"><img src="/static/home/mobile/images/0044<?php if(in_array($controller,array('connection'))): ?>_on<?php endif; ?>.png"><b>推广</b></a></td>
      <li><a href="/home/account.html"><img src="/static/home/mobile/images/0055<?php if(in_array($controller,array('account','charge','fans','vip','feedback','feedback','notice','help'))): ?>_on<?php endif; ?>.png"><b>我的</b></a></li>
      </ul>
</footer>

<script>
	var task_id;
	function toggle_popup(tid){
		task_id=tid;
		$('.popup').show()
	}
	
	function toggle_see(tid){
		task_id=tid;
		$('.see').show()
	}
	
	function toggle_add_see(tid,money){
		task_id=tid;
		$('#add_see_money').val(money)
		$('.add_see').show()
	}
	
	//获取相关
function send_redpackage() {
	var number=$('#number').val()
	var money=$('#money').val()

	if(number<10){
		message('红包个数不能小于10','','error');
		return;
	}
	if(money<1){
		message('红包金额不能小于1','','error');
		return;
	}
    var loading = message('加载中','','loading');
    $.post(
        '/home/mytask/send_redpackage',
        {task_id:task_id,number:number,money:money},
        function (ret) {
            loading.close();
            message(ret.message,ret.redirect,ret.type)
        },'json'
    );
}



	//获取相关
function send_see() {
	var number=$('#see_number').val()
	var money=$('#see_money').val()

	if(number<500){
		message('红包个数不能小于500','','error');
		return;
	}
	if(money<0.02){
		message('单个红包金额不能小于0.02','','error');
		return;
	}
    var loading = message('加载中','','loading');
    $.post(
        '/home/mytask/send_see',
        {task_id:task_id,number:number,money:money},
        function (ret) {
            loading.close();
            message(ret.message,ret.redirect,ret.type)
        },'json'
    );
}


function send_add_see() {
	var number=$('#add_see_number').val()
	var money=$('#add_see_money').val()

	if(number<500){
		message('红包个数不能小于500','','error');
		return;
	}
	if(money<0.02){
		message('单个红包金额不能小于0.02','','error');
		return;
	}
    var loading = message('加载中','','loading');
    $.post(
        '/home/mytask/send_see',
        {task_id:task_id,number:number,money:money},
        function (ret) {
            loading.close();
            message(ret.message,ret.redirect,ret.type)
        },'json'
    );
}




function calc(){
		var number=$('#number').val()
	var money=$('#money').val()
	$('.price_a').html(money)
}

function calc_see(){
		var number=$('#see_number').val()
	var money=$('#see_money').val()
	$('.price_a').html(money*number)
}
function calc_add_see(){
		var number=$('#add_see_number').val()
	var money=$('#add_see_money').val()
	$('.add_price_a').html(money*number)
}
</script>
</body>
</html>